

import requests
url = "https://www.pearvideo.com/video_1742886"
contId = url.split("_")[1]

vidiostatusurl = f"https://www.pearvideo.com/videoStatus.jsp?contId={contId}&mrd=0.5129015484036774"
headers = {
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36 Edg/94.0.992.38",
    "Referer": url
}

resp = requests.get(vidiostatusurl, headers=headers)
dic = resp.json()
srcUrl = dic["videoInfo"]["videos"]["srcUrl"]
systemTime = dic["systemTime"]

srcUrl = srcUrl.replace(systemTime, f"cont-{contId}")

with open("b.mp4", mode="wb")as f:
    f.write(requests.get(srcUrl).content)
# https://video.pearvideo.com/mp4/adshort/20211001/cont-1743029-13176484-202722_adpkg-ad_hd.mp4
# https://video.pearvideo.com/mp4/adshort/20211001/contId=1743029-13176484-202722_adpkg-ad_hd.mp4